package com.ptj.entity;

import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotBlank;

public class User {
	private Integer id;
	@Pattern(regexp="\\w{3,}",message="请输入长度大于3的字符！")
	private String username;
	
	private String userimg;
	@Pattern(regexp="0?(13|14|15|18|17)[0-9]{9}",message="请输正确格式的手机号！")
	private String userphone;
	@NotBlank(message="不能为空！！")
	private String password;
	
	private String sex;
	private String idcard;
	private Double money;
	private List<Task> listtask;
	private List<Task_bag> listbag;
	private List<Task_ok> listok;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getUserimg() {
		return userimg;
	}
	public void setUserimg(String userimg) {
		this.userimg = userimg;
	}
	public String getUserphone() {
		return userphone;
	}
	public void setUserphone(String userphone) {
		this.userphone = userphone;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public Double getMoney() {
		return money;
	}
	public void setMomey(Double money) {
		this.money = money;
	}
	public List<Task> getListtask() {
		return listtask;
	}
	public void setListtask(List<Task> listtask) {
		this.listtask = listtask;
	}
	public List<Task_bag> getListbag() {
		return listbag;
	}
	public void setListbag(List<Task_bag> listbag) {
		this.listbag = listbag;
	}
	public List<Task_ok> getListok() {
		return listok;
	}
	public void setListok(List<Task_ok> listok) {
		this.listok = listok;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", userimg=" + userimg + ", userphone=" + userphone
				+ ", password=" + password + ", sex=" + sex + ", idcard=" + idcard + ", money=" + money + ", listtask="
				+ listtask + ", listbag=" + listbag + ", listok=" + listok + "]";
	}
	
}
